package com.zhdl.modules.prefiresys.entity;

import com.project.common.bean.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 探测器设备
 *
 * @author ACodeYuan
 * @Description:
 * @date 2023/7/21 16:01
 * @Version Y-1.0
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "detector")
public class Detector extends BaseEntity<Detector, String> {
    /**
     * ID
     */
    @Id
    @Column(length = 32)
    private String id;

    /**
     * 探测器名称
     *
     * @mock 测试
     */
    @Column(length = 32)
    private String detectorName;

    /**
     * 探测器编号，唯一，不自增，人工填写
     *
     * @mock 1
     */

    private Integer detectorNo;

    /**
     * 探测器地址，1-255
     *
     * @mock 1
     */

    private short detectorAddr;

    /**
     * 安装位置
     */

    private String position;

    /**
     * 探测器型号
     *
     * @mock HDF-CM
     */

    private String detectorModel;

    /**
     * 通讯是否加密 0为不加密；1为加密
     *
     * @mock 0
     */
    @Column(nullable = false, columnDefinition = "BIT default 0")
    private boolean commEncrypt;

    /**
     * 在主机中的序号，1-3
     *
     * @mock 1
     */
    @Column(nullable = false, columnDefinition = "TINYINT default 1")
    private byte seqInHost;
}
